package com.xsf.jieyou.configuration;

import com.xsf.jieyou.interceptor.FeignRequestInterceptor;
import feign.RequestInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Feign 全局配置。
 * <p>
 * Description:注意的是，引用的时候要在启动类中加载该配置类
 * </p>
 *
 * @author xsf
 * @version v1.0.0
 * @date 2019/11/15 0015 16:17
 * @see com.xsf.jieyou.configuration
 **/
@Configuration
public class FeignRequestConfiguration {
    @Bean
    public RequestInterceptor requestInterceptor() {
        return new FeignRequestInterceptor();
    }
}
